// 统一管理里面的api
import request from '@/utils/request'
import qs from 'qs'

// api/users 时间
export const getUsers = (params) => {
  return request({
    url: '/api/users?' + qs.stringify(params, { arrayFormat: 'repeat' })
  })
}

// api/users 修改
export const putUsers = data => {
  return request({
    url: '/api/users',
    method: 'PUT',
    data
  })
}
// api/users 删除
export const DELETEUsers = (data) => {
  return request({
    url: '/api/users',
    method: 'DELETE',
    data
  })
}

// api/users 添加
export const postUsers = data => {
  return request({
    url: 'api/users',
    method: 'post',
    data
  })
}

// api/users 修改
export const downLoadUsers = params => {
  return request({
    url: '/api/users/download?' + qs.stringify(params, { arrayFormat: 'repeat' }),
    responseType: 'blob'
  })
}
